<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Theron: Theron::IAllocator Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Theron
   &#160;<span id="projectnumber">6.00.02</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceTheron.html">Theron</a></li><li class="navelem"><a class="el" href="classTheron_1_1IAllocator.html">IAllocator</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classTheron_1_1IAllocator-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Theron::IAllocator Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Interface describing a general-purpose memory allocator.  
 <a href="classTheron_1_1IAllocator.html#details">More...</a></p>

<p><code>#include &lt;IAllocator.h&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Theron::IAllocator:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classTheron_1_1IAllocator.png" usemap="#Theron::IAllocator_map" alt=""/>
  <map id="Theron::IAllocator_map" name="Theron::IAllocator_map">
<area href="classTheron_1_1DefaultAllocator.html" title="A simple general purpose memory allocator used by default. " alt="Theron::DefaultAllocator" shape="rect" coords="0,56,149,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ab4f937fc8550c316305fc830ad779974"><td class="memItemLeft" align="right" valign="top">typedef <a class="el" href="namespaceTheron_a254da7d1d07833b997828500fbf73daa.html#a254da7d1d07833b997828500fbf73daa">uint32_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_ab4f937fc8550c316305fc830ad779974.html#ab4f937fc8550c316305fc830ad779974">SizeType</a></td></tr>
<tr class="memdesc:ab4f937fc8550c316305fc830ad779974"><td class="mdescLeft">&#160;</td><td class="mdescRight">Defines an integer type used for specifying sizes of memory allocations.  <a href="#ab4f937fc8550c316305fc830ad779974">More...</a><br/></td></tr>
<tr class="separator:ab4f937fc8550c316305fc830ad779974"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad0c31c6a84b3bf476dae611ac38df1ef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_ad0c31c6a84b3bf476dae611ac38df1ef.html#ad0c31c6a84b3bf476dae611ac38df1ef">IAllocator</a> ()</td></tr>
<tr class="memdesc:ad0c31c6a84b3bf476dae611ac38df1ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor.  <a href="#ad0c31c6a84b3bf476dae611ac38df1ef">More...</a><br/></td></tr>
<tr class="separator:ad0c31c6a84b3bf476dae611ac38df1ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acdc25bbadb8cc7763d9161ce8f661053"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_acdc25bbadb8cc7763d9161ce8f661053.html#acdc25bbadb8cc7763d9161ce8f661053">~IAllocator</a> ()</td></tr>
<tr class="memdesc:acdc25bbadb8cc7763d9161ce8f661053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Virtual destructor.  <a href="#acdc25bbadb8cc7763d9161ce8f661053">More...</a><br/></td></tr>
<tr class="separator:acdc25bbadb8cc7763d9161ce8f661053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43b1f5bfe12ac04f7f596445e535ae0c"><td class="memItemLeft" align="right" valign="top">virtual void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_a43b1f5bfe12ac04f7f596445e535ae0c.html#a43b1f5bfe12ac04f7f596445e535ae0c">Allocate</a> (const <a class="el" href="classTheron_1_1IAllocator_ab4f937fc8550c316305fc830ad779974.html#ab4f937fc8550c316305fc830ad779974">SizeType</a> size)=0</td></tr>
<tr class="memdesc:a43b1f5bfe12ac04f7f596445e535ae0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a piece of contiguous memory.  <a href="#a43b1f5bfe12ac04f7f596445e535ae0c">More...</a><br/></td></tr>
<tr class="separator:a43b1f5bfe12ac04f7f596445e535ae0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a765be9c2496fae5b6f228d33b4ec2f87"><td class="memItemLeft" align="right" valign="top">virtual void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_a765be9c2496fae5b6f228d33b4ec2f87.html#a765be9c2496fae5b6f228d33b4ec2f87">AllocateAligned</a> (const <a class="el" href="classTheron_1_1IAllocator_ab4f937fc8550c316305fc830ad779974.html#ab4f937fc8550c316305fc830ad779974">SizeType</a> size, const <a class="el" href="classTheron_1_1IAllocator_ab4f937fc8550c316305fc830ad779974.html#ab4f937fc8550c316305fc830ad779974">SizeType</a>)</td></tr>
<tr class="memdesc:a765be9c2496fae5b6f228d33b4ec2f87"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allocates a piece of contiguous memory aligned to a given byte-multiple boundary.  <a href="#a765be9c2496fae5b6f228d33b4ec2f87">More...</a><br/></td></tr>
<tr class="separator:a765be9c2496fae5b6f228d33b4ec2f87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe399d376cc7b056885e72f57d2154b8"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_abe399d376cc7b056885e72f57d2154b8.html#abe399d376cc7b056885e72f57d2154b8">Free</a> (void *const memory)=0</td></tr>
<tr class="memdesc:abe399d376cc7b056885e72f57d2154b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees a previously allocated piece of contiguous memory.  <a href="#abe399d376cc7b056885e72f57d2154b8">More...</a><br/></td></tr>
<tr class="separator:abe399d376cc7b056885e72f57d2154b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55ab415ea21b84226c1211f583477a00"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTheron_1_1IAllocator_a55ab415ea21b84226c1211f583477a00.html#a55ab415ea21b84226c1211f583477a00">Free</a> (void *const memory, const <a class="el" href="classTheron_1_1IAllocator_ab4f937fc8550c316305fc830ad779974.html#ab4f937fc8550c316305fc830ad779974">SizeType</a>)</td></tr>
<tr class="memdesc:a55ab415ea21b84226c1211f583477a00"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees a previously allocated block of contiguous memory of a known size.  <a href="#a55ab415ea21b84226c1211f583477a00">More...</a><br/></td></tr>
<tr class="separator:a55ab415ea21b84226c1211f583477a00"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface describing a general-purpose memory allocator. </p>
<p>This interface class defines the interface expected of allocators used by <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a>. In particular, it characterizes the type of allocator that can be assigned as <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a>'s internal allocator with <a class="el" href="classTheron_1_1AllocatorManager_a9ecdc8b1ae227f95a1eae7a2d399a9c0.html#a9ecdc8b1ae227f95a1eae7a2d399a9c0">AllocatorManager::SetAllocator</a>.</p>
<p>By implementing the <a class="el" href="classTheron_1_1IAllocator.html" title="Interface describing a general-purpose memory allocator. ">IAllocator</a> interface on a custom allocator implementation (or wrapping an existing allocator in a custom wrapper that implements <a class="el" href="classTheron_1_1IAllocator.html" title="Interface describing a general-purpose memory allocator. ">IAllocator</a>), users can provide a custom allocator to be used by <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a>. When set via <a class="el" href="classTheron_1_1AllocatorManager_a9ecdc8b1ae227f95a1eae7a2d399a9c0.html#a9ecdc8b1ae227f95a1eae7a2d399a9c0">AllocatorManager::SetAllocator</a>, then the allocator replaces the <a class="el" href="classTheron_1_1DefaultAllocator.html">DefaultAllocator</a> that is used within <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a> by default.</p>
<p>By replacing the default allocator, users can control, cache, or optimize the allocation of memory within <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a>. <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a> guarantees that all of its internal heap allocations are allocated via the allocator set with <a class="el" href="classTheron_1_1AllocatorManager_a9ecdc8b1ae227f95a1eae7a2d399a9c0.html#a9ecdc8b1ae227f95a1eae7a2d399a9c0">AllocatorManager::SetAllocator</a>, as long as the allocator is set before any <a class="el" href="namespaceTheron.html" title="Main namespace containing all public API components. ">Theron</a> objects are constructed. </p>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
